/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = 'regional';
  @endpointMap = {
    ap-northeast-1 = 'appms.aliyuncs.com',
    ap-northeast-2-pop = 'appms.aliyuncs.com',
    ap-south-1 = 'appms.aliyuncs.com',
    ap-southeast-1 = 'appms.aliyuncs.com',
    ap-southeast-2 = 'appms.aliyuncs.com',
    ap-southeast-3 = 'appms.aliyuncs.com',
    ap-southeast-5 = 'appms.aliyuncs.com',
    cn-beijing = 'appms.aliyuncs.com',
    cn-beijing-finance-1 = 'appms.aliyuncs.com',
    cn-beijing-finance-pop = 'appms.aliyuncs.com',
    cn-beijing-gov-1 = 'appms.aliyuncs.com',
    cn-beijing-nu16-b01 = 'appms.aliyuncs.com',
    cn-chengdu = 'appms.aliyuncs.com',
    cn-edge-1 = 'appms.aliyuncs.com',
    cn-fujian = 'appms.aliyuncs.com',
    cn-haidian-cm12-c01 = 'appms.aliyuncs.com',
    cn-hangzhou = 'appms.aliyuncs.com',
    cn-hangzhou-bj-b01 = 'appms.aliyuncs.com',
    cn-hangzhou-finance = 'appms.aliyuncs.com',
    cn-hangzhou-internal-prod-1 = 'appms.aliyuncs.com',
    cn-hangzhou-internal-test-1 = 'appms.aliyuncs.com',
    cn-hangzhou-internal-test-2 = 'appms.aliyuncs.com',
    cn-hangzhou-internal-test-3 = 'appms.aliyuncs.com',
    cn-hangzhou-test-306 = 'appms.aliyuncs.com',
    cn-hongkong = 'appms.aliyuncs.com',
    cn-hongkong-finance-pop = 'appms.aliyuncs.com',
    cn-huhehaote = 'appms.aliyuncs.com',
    cn-north-2-gov-1 = 'appms.aliyuncs.com',
    cn-qingdao = 'appms.aliyuncs.com',
    cn-qingdao-nebula = 'appms.aliyuncs.com',
    cn-shanghai = 'appms.aliyuncs.com',
    cn-shanghai-et15-b01 = 'appms.aliyuncs.com',
    cn-shanghai-et2-b01 = 'appms.aliyuncs.com',
    cn-shanghai-finance-1 = 'appms.aliyuncs.com',
    cn-shanghai-inner = 'appms.aliyuncs.com',
    cn-shanghai-internal-test-1 = 'appms.aliyuncs.com',
    cn-shenzhen = 'appms.aliyuncs.com',
    cn-shenzhen-finance-1 = 'appms.aliyuncs.com',
    cn-shenzhen-inner = 'appms.aliyuncs.com',
    cn-shenzhen-st4-d01 = 'appms.aliyuncs.com',
    cn-shenzhen-su18-b01 = 'appms.aliyuncs.com',
    cn-wuhan = 'appms.aliyuncs.com',
    cn-yushanfang = 'appms.aliyuncs.com',
    cn-zhangbei-na61-b01 = 'appms.aliyuncs.com',
    cn-zhangjiakou = 'appms.aliyuncs.com',
    cn-zhangjiakou-na62-a01 = 'appms.aliyuncs.com',
    cn-zhengzhou-nebula-1 = 'appms.aliyuncs.com',
    eu-central-1 = 'appms.aliyuncs.com',
    eu-west-1 = 'appms.aliyuncs.com',
    eu-west-1-oxs = 'appms.aliyuncs.com',
    me-east-1 = 'appms.aliyuncs.com',
    rus-west-1-pop = 'appms.aliyuncs.com',
    us-east-1 = 'appms.aliyuncs.com',
    us-west-1 = 'appms.aliyuncs.com',
  };

  checkConfig(config);
  @endpoint = getEndpoint('appmallsservice', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model GetMessagesRequest {
  paramsJson?: string(name='ParamsJson', example='{"":""}'),
  topic?: string(name='Topic', example='taobaoFilmRefund'),
}

model GetMessagesResponseBody = {
  bizMessages?: [ 
    {
      contentMapJson?: string(name='ContentMapJson', example='{   "bizSerial":"",   "cinemaAddress":"",   "cinemaId":"",   "cinemaName":"",   "extOrderId":"",   "hall":"",   "oriPrice":"",   "payDate":"",   "refundDate":"",   "refundReason":"",   "scheduleId":"",   "seatCount":"",   "seatInfo":"",   "showEndTime":"",   "showId":"",   "showName":"",   "showTime":"",   "status":"",   "tbOrderId":"" }'),
      dataId?: long(name='DataId', example='1234'),
      pubTime?: string(name='PubTime', example='2018-01-01 12:23:25'),
      topic?: string(name='Topic', example='taobaoFilmRefund'),
    }
  ](name='BizMessages'),
  errorCode?: string(name='ErrorCode', example='9999'),
  logsId?: string(name='LogsId', example='abcdfsdbwef'),
  msg?: string(name='Msg', example='Remote service error'),
  requestId?: string(name='RequestId', example='req-sdf-sf-sdfwer'),
  subCode?: string(name='SubCode', example='isv.invalid-parameter'),
  subMsg?: string(name='SubMsg'),
}

model GetMessagesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetMessagesResponseBody(name='body'),
}

async function getMessagesWithOptions(request: GetMessagesRequest, runtime: Util.RuntimeOptions): GetMessagesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.paramsJson)) {
    query['ParamsJson'] = request.paramsJson;
  }
  if (!Util.isUnset(request.topic)) {
    query['Topic'] = request.topic;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetMessages',
    version = '2018-02-24',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getMessages(request: GetMessagesRequest): GetMessagesResponse {
  var runtime = new Util.RuntimeOptions{};
  return getMessagesWithOptions(request, runtime);
}

model RemoveMessagesRequest {
  msgIds?: map[string]any(name='MsgIds', example='[1,2,3]'),
  paramsJson?: string(name='ParamsJson', example='{"":""}'),
}

model RemoveMessagesShrinkRequest {
  msgIdsShrink?: string(name='MsgIds', example='[1,2,3]'),
  paramsJson?: string(name='ParamsJson', example='{"":""}'),
}

model RemoveMessagesResponseBody = {
  errorCode?: string(name='ErrorCode', example='50'),
  logsId?: string(name='LogsId', example='abcdfsdbwef'),
  msg?: string(name='Msg', example='Remote service error'),
  requestId?: string(name='RequestId', example='req-sdf-sf-sdfwer'),
  returnCode?: string(name='ReturnCode', example='0'),
  returnMessage?: string(name='ReturnMessage'),
  returnValue?: string(name='ReturnValue', example='true'),
  subCode?: string(name='SubCode', example='isv.invalid-parameter'),
  subMsg?: string(name='SubMsg'),
}

model RemoveMessagesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: RemoveMessagesResponseBody(name='body'),
}

async function removeMessagesWithOptions(tmpReq: RemoveMessagesRequest, runtime: Util.RuntimeOptions): RemoveMessagesResponse {
  Util.validateModel(tmpReq);
  var request = new RemoveMessagesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.msgIds)) {
    request.msgIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.msgIds, 'MsgIds', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.msgIdsShrink)) {
    query['MsgIds'] = request.msgIdsShrink;
  }
  if (!Util.isUnset(request.paramsJson)) {
    query['ParamsJson'] = request.paramsJson;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RemoveMessages',
    version = '2018-02-24',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function removeMessages(request: RemoveMessagesRequest): RemoveMessagesResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeMessagesWithOptions(request, runtime);
}

model TaobaoFilmGetCinemasRequest {
  pageIndex?: long(name='PageIndex', example='1'),
  paramsJson?: string(name='ParamsJson', example='{"":""}'),
}

model TaobaoFilmGetCinemasResponseBody = {
  cinemas?: [ 
    {
      address?: string(name='Address'),
      cinemaName?: string(name='CinemaName'),
      cityId?: long(name='CityId', example='12345'),
      id?: long(name='Id', example='12345'),
      latitude?: string(name='Latitude', example='120.1'),
      longitude?: string(name='Longitude', example='30.1'),
      phone?: string(name='Phone', example='0571-xxxxx,111 0577-ccc,222'),
      regionName?: string(name='RegionName'),
      scheduleCloseTime?: long(name='ScheduleCloseTime', example='15'),
      standardId?: string(name='StandardId', example='42112601'),
    }
  ](name='Cinemas'),
  errorCode?: string(name='ErrorCode', example='9999'),
  logsId?: string(name='LogsId', example='abcdfsdbwef'),
  msg?: string(name='Msg', example='Remote service error'),
  requestId?: string(name='RequestId', example='req-sdf-sf-sdfwer'),
  subCode?: string(name='SubCode', example='isv.invalid-parameter'),
  subMsg?: string(name='SubMsg'),
  totalCount?: long(name='TotalCount', example='5'),
}

model TaobaoFilmGetCinemasResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: TaobaoFilmGetCinemasResponseBody(name='body'),
}

async function taobaoFilmGetCinemasWithOptions(request: TaobaoFilmGetCinemasRequest, runtime: Util.RuntimeOptions): TaobaoFilmGetCinemasResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.pageIndex)) {
    query['PageIndex'] = request.pageIndex;
  }
  if (!Util.isUnset(request.paramsJson)) {
    query['ParamsJson'] = request.paramsJson;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'TaobaoFilmGetCinemas',
    version = '2018-02-24',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function taobaoFilmGetCinemas(request: TaobaoFilmGetCinemasRequest): TaobaoFilmGetCinemasResponse {
  var runtime = new Util.RuntimeOptions{};
  return taobaoFilmGetCinemasWithOptions(request, runtime);
}

model TaobaoFilmGetHotShowsRequest {
  cityCode?: long(name='CityCode', example='310100'),
  paramsJson?: string(name='ParamsJson', example='{"":""}'),
}

model TaobaoFilmGetHotShowsResponseBody = {
  errorCode?: string(name='ErrorCode', example='50'),
  logsId?: string(name='LogsId', example='abcdfsdbwef'),
  msg?: string(name='Msg', example='Remote service error'),
  requestId?: string(name='RequestId', example='req-sdf-sf-sdfwer'),
  shows?: [ 
    {
      backgroundPicture?: string(name='BackgroundPicture', example='xxx.jpg'),
      country?: string(name='Country'),
      description?: string(name='Description'),
      director?: string(name='Director'),
      duration?: long(name='Duration', example='123'),
      highlight?: string(name='Highlight'),
      id?: long(name='Id', example='12345'),
      language?: string(name='Language', example='Chinese'),
      leadingRole?: string(name='LeadingRole'),
      openDay?: string(name='OpenDay', example='2017-09-09 00:00:00'),
      openTime?: string(name='OpenTime', example='2017-09-09'),
      poster?: string(name='Poster', example='xxx.jpg'),
      remark?: string(name='Remark', example='9.7'),
      showMark?: string(name='ShowMark', example='IMAX'),
      showName?: string(name='ShowName'),
      showNameEn?: string(name='ShowNameEn', example='liudehua'),
      showVersionList?: [ string ](name='ShowVersionList'),
      trailerList?: [ string ](name='TrailerList'),
      type?: string(name='Type'),
    }
  ](name='Shows'),
  subCode?: string(name='SubCode', example='isv.invalid-parameter'),
  subMsg?: string(name='SubMsg'),
}

model TaobaoFilmGetHotShowsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: TaobaoFilmGetHotShowsResponseBody(name='body'),
}

async function taobaoFilmGetHotShowsWithOptions(request: TaobaoFilmGetHotShowsRequest, runtime: Util.RuntimeOptions): TaobaoFilmGetHotShowsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.cityCode)) {
    query['CityCode'] = request.cityCode;
  }
  if (!Util.isUnset(request.paramsJson)) {
    query['ParamsJson'] = request.paramsJson;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'TaobaoFilmGetHotShows',
    version = '2018-02-24',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function taobaoFilmGetHotShows(request: TaobaoFilmGetHotShowsRequest): TaobaoFilmGetHotShowsResponse {
  var runtime = new Util.RuntimeOptions{};
  return taobaoFilmGetHotShowsWithOptions(request, runtime);
}

model TaobaoFilmGetRegionListRequest {
  paramsJson?: string(name='ParamsJson', example='{ "key": "val" }'),
}

model TaobaoFilmGetRegionListResponseBody = {
  errorCode?: string(name='ErrorCode', example='50'),
  logsId?: string(name='LogsId', example='abcdfsdbwef'),
  msg?: string(name='Msg', example='Remote service error'),
  regions?: [ 
    {
      cityCode?: long(name='CityCode', example='330100'),
      id?: long(name='Id', example='123'),
      parentId?: long(name='ParentId', example='0'),
      pinYin?: string(name='PinYin', example='HANGZHOU'),
      regionName?: string(name='RegionName'),
    }
  ](name='Regions'),
  requestId?: string(name='RequestId', example='req-sdf-sf-sdfwer'),
  subCode?: string(name='SubCode', example='isv.invalid-parameter'),
  subMsg?: string(name='SubMsg'),
}

model TaobaoFilmGetRegionListResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: TaobaoFilmGetRegionListResponseBody(name='body'),
}

async function taobaoFilmGetRegionListWithOptions(request: TaobaoFilmGetRegionListRequest, runtime: Util.RuntimeOptions): TaobaoFilmGetRegionListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.paramsJson)) {
    query['ParamsJson'] = request.paramsJson;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'TaobaoFilmGetRegionList',
    version = '2018-02-24',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function taobaoFilmGetRegionList(request: TaobaoFilmGetRegionListRequest): TaobaoFilmGetRegionListResponse {
  var runtime = new Util.RuntimeOptions{};
  return taobaoFilmGetRegionListWithOptions(request, runtime);
}

model TaobaoFilmGetSchedulesRequest {
  cinemaId?: long(name='CinemaId', example='4288'),
  paramsJson?: string(name='ParamsJson', example='{\\"\\":\\"\\"}'),
}

model TaobaoFilmGetSchedulesResponseBody = {
  errorCode?: string(name='ErrorCode', example='9999'),
  logsId?: string(name='LogsId', example='abcdfsdbwef'),
  msg?: string(name='Msg', example='Remote service error'),
  requestId?: string(name='RequestId', example='req-sdf-sf-sdfwer'),
  schedules?: [ 
    {
      cinemaId?: long(name='CinemaId', example='12345'),
      closeTime?: string(name='CloseTime', example='2017-09-09 12:11:11'),
      hallId?: string(name='HallId'),
      hallName?: string(name='HallName', example='xxx'),
      id?: long(name='Id', example='12345'),
      isExpired?: boolean(name='IsExpired', example='false'),
      maxCanBuy?: long(name='MaxCanBuy', example='4'),
      price?: long(name='Price', example='2000'),
      scheduleArea?: string(name='ScheduleArea', example='area:33,price:3010,serviceFee:0;area:34,price:4010,serviceFee:0;'),
      sectionId?: string(name='SectionId'),
      serviceFee?: long(name='ServiceFee', example='100'),
      showDate?: string(name='ShowDate', example='2017-09-09'),
      showId?: long(name='ShowId', example='12345'),
      showTime?: string(name='ShowTime', example='2017-09-09 11:11:11'),
      showVersion?: string(name='ShowVersion'),
    }
  ](name='Schedules'),
  subCode?: string(name='SubCode', example='isv.invalid-parameter'),
  subMsg?: string(name='SubMsg'),
}

model TaobaoFilmGetSchedulesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: TaobaoFilmGetSchedulesResponseBody(name='body'),
}

async function taobaoFilmGetSchedulesWithOptions(request: TaobaoFilmGetSchedulesRequest, runtime: Util.RuntimeOptions): TaobaoFilmGetSchedulesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.cinemaId)) {
    query['CinemaId'] = request.cinemaId;
  }
  if (!Util.isUnset(request.paramsJson)) {
    query['ParamsJson'] = request.paramsJson;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'TaobaoFilmGetSchedules',
    version = '2018-02-24',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function taobaoFilmGetSchedules(request: TaobaoFilmGetSchedulesRequest): TaobaoFilmGetSchedulesResponse {
  var runtime = new Util.RuntimeOptions{};
  return taobaoFilmGetSchedulesWithOptions(request, runtime);
}

model TaobaoFilmGetSeatsRequest {
  paramsJson?: string(name='ParamsJson', example='{"":""}'),
  scheduleId?: long(name='ScheduleId', example='507589116'),
}

model TaobaoFilmGetSeatsResponseBody = {
  errorCode?: string(name='ErrorCode', example='9000'),
  logsId?: string(name='LogsId', example='abcdfsdbwef'),
  msg?: string(name='Msg', example='Remote service error'),
  requestId?: string(name='RequestId', example='req-sdf-sf-sdfwer'),
  seatMap?: {
    maxCanBuy?: long(name='MaxCanBuy', example='4'),
    maxColumn?: long(name='MaxColumn', example='10'),
    maxLeftPx?: long(name='MaxLeftPx', example='30'),
    maxRow?: long(name='MaxRow', example='4'),
    maxTopPx?: long(name='MaxTopPx', example='30'),
    minColumn?: long(name='MinColumn', example='6'),
    minLeftPx?: long(name='MinLeftPx', example='30'),
    minRow?: long(name='MinRow', example='3'),
    minTopPx?: long(name='MinTopPx', example='30'),
    notice?: string(name='Notice'),
    regular?: boolean(name='Regular', example='true'),
    seatCount?: long(name='SeatCount', example='30'),
    seats?: [ 
      {
        area?: string(name='Area', example='11'),
        column?: long(name='Column', example='3'),
        extId?: string(name='ExtId', example='0000023'),
        flag?: long(name='Flag', example='0'),
        leftPx?: long(name='LeftPx', example='30'),
        name?: string(name='Name'),
        row?: long(name='Row', example='4'),
        rowName?: string(name='RowName'),
        status?: long(name='Status', example='1'),
        topPx?: long(name='TopPx', example='30'),
      }
    ](name='Seats'),
    soldCount?: long(name='SoldCount', example='5'),
    tipMessage?: string(name='TipMessage'),
  }(name='SeatMap'),
  subCode?: string(name='SubCode', example='isv.invalid-parameter'),
  subMsg?: string(name='SubMsg'),
}

model TaobaoFilmGetSeatsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: TaobaoFilmGetSeatsResponseBody(name='body'),
}

async function taobaoFilmGetSeatsWithOptions(request: TaobaoFilmGetSeatsRequest, runtime: Util.RuntimeOptions): TaobaoFilmGetSeatsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.paramsJson)) {
    query['ParamsJson'] = request.paramsJson;
  }
  if (!Util.isUnset(request.scheduleId)) {
    query['ScheduleId'] = request.scheduleId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'TaobaoFilmGetSeats',
    version = '2018-02-24',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function taobaoFilmGetSeats(request: TaobaoFilmGetSeatsRequest): TaobaoFilmGetSeatsResponse {
  var runtime = new Util.RuntimeOptions{};
  return taobaoFilmGetSeatsWithOptions(request, runtime);
}

model TaobaoFilmGetShowCommentsRequest {
  pageIndex?: long(name='PageIndex', example='1'),
  paramsJson?: string(name='ParamsJson', example='{"":""}'),
  showId?: long(name='ShowId', example='129342909'),
}

model TaobaoFilmGetShowCommentsResponseBody = {
  commentList?: [ 
    {
      commentTime?: string(name='CommentTime', example='1543256789'),
      content?: string(name='Content'),
      favorCount?: long(name='FavorCount', example='23'),
      id?: long(name='Id', example='12345'),
      nickName?: string(name='NickName'),
      remark?: long(name='Remark', example='9'),
      showId?: long(name='ShowId', example='12345'),
      subject?: string(name='Subject'),
    }
  ](name='CommentList'),
  count?: long(name='Count', example='12'),
  errorCode?: string(name='ErrorCode', example='0009'),
  logsId?: string(name='LogsId', example='abcdfsdbwef'),
  msg?: string(name='Msg', example='Remote service error'),
  requestId?: string(name='RequestId', example='req-sdf-sf-sdfwer'),
  subCode?: string(name='SubCode', example='isv.invalid-parameter'),
  subMsg?: string(name='SubMsg'),
}

model TaobaoFilmGetShowCommentsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: TaobaoFilmGetShowCommentsResponseBody(name='body'),
}

async function taobaoFilmGetShowCommentsWithOptions(request: TaobaoFilmGetShowCommentsRequest, runtime: Util.RuntimeOptions): TaobaoFilmGetShowCommentsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.pageIndex)) {
    query['PageIndex'] = request.pageIndex;
  }
  if (!Util.isUnset(request.paramsJson)) {
    query['ParamsJson'] = request.paramsJson;
  }
  if (!Util.isUnset(request.showId)) {
    query['ShowId'] = request.showId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'TaobaoFilmGetShowComments',
    version = '2018-02-24',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function taobaoFilmGetShowComments(request: TaobaoFilmGetShowCommentsRequest): TaobaoFilmGetShowCommentsResponse {
  var runtime = new Util.RuntimeOptions{};
  return taobaoFilmGetShowCommentsWithOptions(request, runtime);
}

model TaobaoFilmGetSoonShowsRequest {
  cityCode?: long(name='CityCode', example='310100'),
  paramsJson?: string(name='ParamsJson', example='{"":""}'),
}

model TaobaoFilmGetSoonShowsResponseBody = {
  errorCode?: string(name='ErrorCode', example='9000'),
  logsId?: string(name='LogsId', example='abcdfsdbwef'),
  msg?: string(name='Msg', example='Remote service error'),
  requestId?: string(name='RequestId', example='req-sdf-sf-sdfwer'),
  shows?: [ 
    {
      backgroundPicture?: string(name='BackgroundPicture', example='xxxx.jpg'),
      country?: string(name='Country'),
      description?: string(name='Description'),
      director?: string(name='Director'),
      duration?: long(name='Duration', example='123'),
      highlight?: string(name='Highlight'),
      id?: long(name='Id', example='123'),
      language?: string(name='Language', example='English'),
      leadingRole?: string(name='LeadingRole'),
      openDay?: string(name='OpenDay', example='2017-02-01 12:00:00'),
      openTime?: string(name='OpenTime', example='2017-02-01'),
      poster?: string(name='Poster', example='xxxx.jpg'),
      remark?: string(name='Remark', example='9.7'),
      showMark?: string(name='ShowMark'),
      showName?: string(name='ShowName'),
      showNameEn?: string(name='ShowNameEn'),
      showVersionList?: [ string ](name='ShowVersionList'),
      trailerList?: [ string ](name='TrailerList'),
      type?: string(name='Type'),
    }
  ](name='Shows'),
  subCode?: string(name='SubCode', example='isv.invalid-parameter'),
  subMsg?: string(name='SubMsg'),
}

model TaobaoFilmGetSoonShowsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: TaobaoFilmGetSoonShowsResponseBody(name='body'),
}

async function taobaoFilmGetSoonShowsWithOptions(request: TaobaoFilmGetSoonShowsRequest, runtime: Util.RuntimeOptions): TaobaoFilmGetSoonShowsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.cityCode)) {
    query['CityCode'] = request.cityCode;
  }
  if (!Util.isUnset(request.paramsJson)) {
    query['ParamsJson'] = request.paramsJson;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'TaobaoFilmGetSoonShows',
    version = '2018-02-24',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function taobaoFilmGetSoonShows(request: TaobaoFilmGetSoonShowsRequest): TaobaoFilmGetSoonShowsResponse {
  var runtime = new Util.RuntimeOptions{};
  return taobaoFilmGetSoonShowsWithOptions(request, runtime);
}

model TaobaoFilmIssueOrderRequest {
  extOrderId?: string(name='ExtOrderId', example='111111111'),
  extUserId?: string(name='ExtUserId', example='222222222'),
  lockSeatApplyKey?: string(name='LockSeatApplyKey', example='3714018795_3714018795'),
  paramsJson?: string(name='ParamsJson', example='{"price_detail":"user-3000,other-2000"}'),
  totalPrice?: long(name='TotalPrice', example='5000'),
}

model TaobaoFilmIssueOrderResponseBody = {
  errorCode?: string(name='ErrorCode', example='9000'),
  logsId?: string(name='LogsId', example='abcdfsdbwef'),
  message?: string(name='Message', description='message'),
  msg?: string(name='Msg', example='Remote service error'),
  requestId?: string(name='RequestId', example='req-sdf-sf-sdfwer'),
  status?: string(name='Status', example='TRADE_SUCCESS'),
  subCode?: string(name='SubCode', example='isv.invalid-parameter'),
  subMsg?: string(name='SubMsg'),
  tbOrderId?: string(name='TbOrderId', example='14234856846434949'),
  ticketContents?: string(name='TicketContents'),
}

model TaobaoFilmIssueOrderResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: TaobaoFilmIssueOrderResponseBody(name='body'),
}

async function taobaoFilmIssueOrderWithOptions(request: TaobaoFilmIssueOrderRequest, runtime: Util.RuntimeOptions): TaobaoFilmIssueOrderResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.extOrderId)) {
    query['ExtOrderId'] = request.extOrderId;
  }
  if (!Util.isUnset(request.extUserId)) {
    query['ExtUserId'] = request.extUserId;
  }
  if (!Util.isUnset(request.lockSeatApplyKey)) {
    query['LockSeatApplyKey'] = request.lockSeatApplyKey;
  }
  if (!Util.isUnset(request.paramsJson)) {
    query['ParamsJson'] = request.paramsJson;
  }
  if (!Util.isUnset(request.totalPrice)) {
    query['TotalPrice'] = request.totalPrice;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'TaobaoFilmIssueOrder',
    version = '2018-02-24',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function taobaoFilmIssueOrder(request: TaobaoFilmIssueOrderRequest): TaobaoFilmIssueOrderResponse {
  var runtime = new Util.RuntimeOptions{};
  return taobaoFilmIssueOrderWithOptions(request, runtime);
}

model TaobaoFilmLockSeatRequest {
  extUserId?: string(name='ExtUserId', example='223283767'),
  mobile?: string(name='Mobile', example='13888888888'),
  paramsJson?: string(name='ParamsJson', example='{"":""}'),
  scheduleId?: long(name='ScheduleId', example='307278905'),
  seatIds?: string(name='SeatIds', example='667910|667912|667911'),
  seatNames?: string(name='SeatNames'),
}

model TaobaoFilmLockSeatResponseBody = {
  errorCode?: string(name='ErrorCode', example='9888'),
  logsId?: string(name='LogsId', example='abcdfsdbwef'),
  msg?: string(name='Msg', example='Remote service error'),
  requestId?: string(name='RequestId', example='req-sdf-sf-sdfwer'),
  seatLocked?: {
    applyKey?: string(name='ApplyKey', example='3637200802_3115592272631'),
    defaultLockSecond?: long(name='DefaultLockSecond', example='900'),
    lockTime?: long(name='LockTime', example='14689897654'),
    status?: string(name='Status', example='LOCK_SUCCESS'),
  }(name='SeatLocked'),
  subCode?: string(name='SubCode', example='isv.invalid-parameter'),
  subMsg?: string(name='SubMsg'),
}

model TaobaoFilmLockSeatResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: TaobaoFilmLockSeatResponseBody(name='body'),
}

async function taobaoFilmLockSeatWithOptions(request: TaobaoFilmLockSeatRequest, runtime: Util.RuntimeOptions): TaobaoFilmLockSeatResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.extUserId)) {
    query['ExtUserId'] = request.extUserId;
  }
  if (!Util.isUnset(request.mobile)) {
    query['Mobile'] = request.mobile;
  }
  if (!Util.isUnset(request.paramsJson)) {
    query['ParamsJson'] = request.paramsJson;
  }
  if (!Util.isUnset(request.scheduleId)) {
    query['ScheduleId'] = request.scheduleId;
  }
  if (!Util.isUnset(request.seatIds)) {
    query['SeatIds'] = request.seatIds;
  }
  if (!Util.isUnset(request.seatNames)) {
    query['SeatNames'] = request.seatNames;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'TaobaoFilmLockSeat',
    version = '2018-02-24',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function taobaoFilmLockSeat(request: TaobaoFilmLockSeatRequest): TaobaoFilmLockSeatResponse {
  var runtime = new Util.RuntimeOptions{};
  return taobaoFilmLockSeatWithOptions(request, runtime);
}

model TaobaoFilmUnLockSeatRequest {
  extUserId?: string(name='ExtUserId', example='2345636'),
  lockSeatApplyKey?: string(name='LockSeatApplyKey', example='13888888888_3115592272966_[671969]'),
  paramsJson?: string(name='ParamsJson', example='{"":""}'),
}

model TaobaoFilmUnLockSeatResponseBody = {
  errorCode?: string(name='ErrorCode', example='50'),
  logsId?: string(name='LogsId', example='abcdfsdbwef'),
  msg?: string(name='Msg', example='Remote service error'),
  requestId?: string(name='RequestId', example='req-sdf-sf-sdfwer'),
  returnCode?: string(name='ReturnCode', example='0'),
  returnMessage?: string(name='ReturnMessage'),
  returnValue?: boolean(name='ReturnValue', example='true'),
  subCode?: string(name='SubCode', example='isv.invalid-parameter'),
  subMsg?: string(name='SubMsg'),
}

model TaobaoFilmUnLockSeatResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: TaobaoFilmUnLockSeatResponseBody(name='body'),
}

async function taobaoFilmUnLockSeatWithOptions(request: TaobaoFilmUnLockSeatRequest, runtime: Util.RuntimeOptions): TaobaoFilmUnLockSeatResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.extUserId)) {
    query['ExtUserId'] = request.extUserId;
  }
  if (!Util.isUnset(request.lockSeatApplyKey)) {
    query['LockSeatApplyKey'] = request.lockSeatApplyKey;
  }
  if (!Util.isUnset(request.paramsJson)) {
    query['ParamsJson'] = request.paramsJson;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'TaobaoFilmUnLockSeat',
    version = '2018-02-24',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function taobaoFilmUnLockSeat(request: TaobaoFilmUnLockSeatRequest): TaobaoFilmUnLockSeatResponse {
  var runtime = new Util.RuntimeOptions{};
  return taobaoFilmUnLockSeatWithOptions(request, runtime);
}

